<template>
  <div class="auditprocess">
    <div class="auditprocess_1">
      <el-button class="btn" type="primary" plain @click="processimg">流程图</el-button>
      <span class="auditprocess_1_title">招投标电子流</span>
      <img src="../../../../assets/images/fanhui.png" @click="back">
    </div>
    <div class="auditprocess_2">
      <el-collapse v-model="activeNames">
        <el-collapse-item name="2" v-if="BiddingTaskListTime">
          <template slot="title">
            <div class="collapseTitle">1.0招标任务</div>
            <div class="collapseTime">{{BiddingTaskListTime}}</div>
          </template>
          <el-card class="cardBox">
            <BiddingTaskList :biddingTaskListId="biddingTaskListId" />
          </el-card>
        </el-collapse-item>

        <el-collapse-item name="3" v-if="ListingTidyTime || statusListingTidy" :class="activeNames[0] == '3'? 'cmdElCollapse': ''">
          <template slot="title">
            <div class="collapseTitle">2.0清单整理</div>
            <div class="collapseTime">{{ListingTidyTime}}</div>
          </template>
          <el-card class="cardBox">
            <ListingTidy :listingTidyId="listingTidyId" :nodeIdId="nodeIdId" :statusListingTidy="statusListingTidy"/>
          </el-card>
        </el-collapse-item>

      </el-collapse>
    </div>
    <!-- <ProcessImg :show="showDialog" :nodeId="nodeId" @closeDlg="closeDialog"></ProcessImg> -->
  </div>
</template>
<script>
import { sysSelectNodesInfo } from '@/api/api'
import biddingTaskList from './flow/biddingTaskList'
import listingTidy from './flow/listing-tidy'

// import ProcessImg from './processImg'
export default {
  components: {
    BiddingTaskList: biddingTaskList,
    ListingTidy: listingTidy,

    // ProcessImg
  },
  data () {
    return {
      biddingTaskListId: '',
      listingTidyId: '',
      //
      nodeIdId: 2,
      activeNames: ['2'],
      isEdit: false,
      status: '',
      type: '',
      // 时间
      BiddingTaskListTime: '2021',
      ListingTidyTime: '2021',

      // 打开审核点击的节点，且作为表单填写或只读样式的判断
      nodeId: '',
      statusListingTidy: false,

      //
      showDialog: false
    }
  },
  created () {
    this.getIds()
  },
  mounted () {
    this.$nextTick(() => {
      this.getSelectNodesInfo()
    })
  },
  methods: {
    getIds () {
      // this.embodimentListId = this.$route.query.orunid
      // this.drawingId = this.$route.query.orunid
      // this.nodeIdId = this.$route.query.nodeIdId
      // this.activeNames = this.$route.query.activeNames
      // this.nodeId = this.$route.query.nodeId
      // this.isEdit = this.$route.query.edit   
      // this.status = this.$route.query.status   
      // console.log(this.status)
    },
    // 查询指定流程所有节点记录
    getSelectNodesInfo () {
      let params = {
        // orunid: this.$route.query.orunid
      }
      this.statusListingTidy = true
      
    },
    back () {
      this.$router.go(-1)
    },
    processimg() {
      // this.nodeId = this.$route.query.nodeId
      // this.showDialog = true
    },
    closeDialog() {
      this.showDialog = false
    },
  }
}
</script>
<style lang="less" scoped>
.auditprocess {
  /* background: rgba(236, 240, 245); */
  width: 75%;
  height: 100%;
  margin: 15px auto;
  .auditprocess_1 {
    width: 100%;
    height: 40px;
    // background: red;
    line-height: 40px;
    text-align: center;
    .auditprocess_1_title {
      font-weight: bold;
      font-size: 30px;
    }
    img {
      margin-top: 10px;
      width: 25px;
      height: 25px;
      float: right;
      cursor: pointer;
    }
    .btn {
      float: left;
    }
  }
  .auditprocess_2 {
    margin-top: 10px;
  }
}
.collapseTitle {
  font-weight: bold;
  font-size: 20px;
  color: rgb(103, 194, 58);
}
.cmdElCollapse {
  .collapseTitle {
    color: rgb(64, 158, 255);
  }
}
.collapseTime {
  position: absolute;
  right: 60px;
}
/deep/ .el-collapse-item__header {
  border-bottom: 1px solid black;
  position: relative;
}
</style>